package cn.hsw.platform.core.base;

import java.util.regex.Pattern;

/**
 * 全局
 * @author 李子木
 * @date 2020-10-28
 */
public class BaseConstant {

    /**
     * 数据状态 正常
     */
    public static final int DATA_SUCCESS = -1;

    /**
     * 数据状态 删除
     */
    public static final int DATA_DELETE = -1;

    /**
     * 全局不等于逻辑删除条件语句
     */
    public static final String NOT_DELETE = "is_soft_del != " + BaseConstant.DATA_DELETE;

    /** 逻辑删除语句 */
    public static final String DELETE_SQL = " set is_soft_del=" + BaseConstant.DATA_DELETE + " WHERE pid=?";

    public static final String VALIDATION_SIZE_ERROR_RIGHT_MSG = "过长了";

    public final static Pattern UNDER_LINE_PATTERN = Pattern.compile("_(\\w)");

    /**
     * 用户名正则
     */
    public static final String USER_NAME_PATTERN = "^[a-zA-Z0-9_-]{8,16}$";

    /**
     * 密码正则
     */
    public static final String PASSWORD_PATTERN = "^[a-zA-Z0-9_-]{8,16}$";

    public static final String VALID_USER_NAME_ERROR_MSG = "用户名不符合规范";

    public static final String VALID_PASSWORD_ERROR_MSG = "密码不符合规范";

    public static final String VALID_PHONE_ERROR_MSG = "手机号不符合规范";

    public static final String VALID_MUST_ONLY_ERROR_MSG = "已经存在";
    public static final String CHECK_PARAM_ERROR_TAG = "参数校验异常";
    public static final String PLATFORM_ERROR_TAG = "系统异常";
}
